package ioc

import (
	"webook/internal/service/sms"
	"webook/internal/service/sms/local_sms"
)

func InitSMSService() sms.Service {
	//return ratelimit.NewRateLimitSMSService(local_sms.NewService(),limiter.NewRedisSlidingWindowLimiter())
	return local_sms.NewService()
}
func initTencentSMSService() sms.Service {
	//secretId, ok := os.LookupEnv("SMS_SECRET_ID")
	//if !ok {
	//	panic("找不到腾讯 SMS 的 secret id")
	//}
	//secretKey, ok := os.LookupEnv("SMS_SECRET_KEY")
	//if !ok {
	//	panic("找不到腾讯 SMS 的 secret key")
	//}
	//c, err := tencentSMS.NewClient(
	//	common.NewCredential(secretId, secretKey),
	//	"ap-nanjing",
	//	profile.NewClientProfile(),
	//)
	//if err != nil {
	//	panic(err)
	//}
	//return tencent.NewService(c, "1400842696", "妙影科技")
	return nil
}
